﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="leave.aspx.cs" Inherits="HY.WEB.OA._leave" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
 <ext:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel2"  />


  <ext:Panel ID="Panel2" runat="server" Height="250px"  AutoWidth="true" ShowBorder="True"
        Layout="HBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BoxConfigPadding="0"
        BoxConfigChildMargin="0 0 0 0" ShowHeader="True" Title="请假申请单">
         <Toolbars>
            <ext:Toolbar ID="Toolbar2" runat="server">
                <Items>
                
<ext:DropDownList ID="ddlfiled" runat="server" Label="查询字段"  >
</ext:DropDownList>

<ext:DropDownList ID="ddlwhere" runat="server" Label="查询条件"  >
</ext:DropDownList>

<ext:TwinTriggerBox ID="txt" runat="server" ShowLabel="false" EmptyText="关键字"
 Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
　OnTrigger1Click="ttbSearchMessage_Trigger1Click">
</ext:TwinTriggerBox>

    <ext:Button ID="btnSearch" Icon="Zoom" runat="server"  Text="高级查询" >
    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>

        <Items>

        <ext:Panel ID="Panel1" Title="添加申请" EnableBackgroundColor="true" Width="300px" runat="server"   BoxFlex="1" 
                BodyPadding="5px" ShowBorder="true" ShowHeader="true">
           
                <Items>
                    <ext:SimpleForm ID="SimpleForm1" runat="server" BodyPadding="5px" EnableBackgroundColor="true"  Title="ADD" >
                        <Items>
                   

             <ext:HiddenField ID="hidsid" runat="server">
             </ext:HiddenField>    
             <ext:Label ID="lblbh" runat="server" Label="单号" Visible="false"/>

             <ext:Label ID="lblname" runat="server" Label="姓名" />
             <ext:Label ID="lblcode" runat="server" Label="工号"  Visible="false"/>
           <ext:Label ID="lbljob" runat="server" Label="岗位"  Visible="false"/>
          <ext:DatePicker runat="server"  Required="true" Label="开始日期" EmptyText="请选择开始日期"
                ID="date1" ShowRedStar="True"  DateFormatString="yyyy-M-d HH:mm:ss "  />
           
             <ext:DatePicker runat="server" Required="true" Label="结束日期" EmptyText="请选择结束日期" 
             CompareControl="date1"   
              CompareOperator="GreaterThan" CompareMessage="结束日期应该大于开始日期！" 
                ID="date2" ShowRedStar="True" DateFormatString="yyyy-M-d HH:mm:ss "     />                
            
               <ext:Label ID="lbldays" runat="server" Label="岗位"  Visible="false"/>
               <ext:DropDownList ID="ddlstype" runat="server" Label="请假类型">             
             </ext:DropDownList>             
         
             <ext:TextArea ID="txtmemo" runat="server" Height="50px" Label="原因" Text="">
             </ext:TextArea>

           <ext:Button ID="btsave" runat="server" Text="保存" OnClick="btsave_Click">
             </ext:Button>


                  </Items>
                    </ext:SimpleForm>

           </Items>
            </ext:Panel>
            
             
     
            <ext:Grid ID="Grid2" Title="单据列表"     PageSize="15" ShowBorder="true" 
                ShowHeader="true" AutoHeight="true" AllowPaging="true"
        runat="server"   EnableCheckBoxSelect="True"  DataKeyNames="sid,bh"  AutoPostBack="true"  
        OnPageIndexChange="Grid2_PageIndexChange" EnableRowNumber="True" onrowcommand="Grid2_RowCommand" 
                OnSort="Grid2_Sort"  Width="650px"   AutoScroll="true" >
                              <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="btnDelete" Text="删除选中项(仅删除未审批单据)" Icon="Delete" OnClick="btnDelete_Click" runat="server">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>      
        <Columns>
           
             <ext:LinkButtonField Width="60px" CommandName="sub" HeaderText="单号"  DataTextField="bh"  />               
             
                       <ext:HyperLinkField  Width="60px"   DataToolTipField="sname" DataTextField="sname"  SortField="sname" HeaderText="姓名" 
            DataNavigateUrlFields="bh" DataNavigateUrlFormatString="review_view.aspx?bh={0}" DataNavigateUrlFieldsEncode="true"   Target="_blank" />
          
                 
                     <ext:BoundField Width="120px" DataField="sdt" HeaderText="请假开始时间"  />
                     <ext:BoundField Width="120px" DataField="edt" HeaderText="请假结束时间"  />
                     <ext:BoundField Width="60px" DataField="days" HeaderText="总计天数"  />
                     <ext:BoundField Width="60px" DataField="stype" HeaderText="类型"  />
                     <ext:BoundField Width="100px" DataField="remark" HeaderText="事由"  ToolTip=""  />
                                       
            <ext:TemplateField Width="60px"  HeaderText="状态" >
                <ItemTemplate><%#getstatus(Eval("bh").ToString())%>
                </ItemTemplate>
             </ext:TemplateField>
             

        </Columns>
    </ext:Grid> 
     

  
     
        </Items>
    </ext:Panel>
 <ext:Window ID="Window1" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="750px" Height="509px">
    </ext:Window>
    <br />
    <br />
    <br />
    <br />
    <br />
    </form>
</body>
</html>
